<el-button type="primary" round @click="dialogVisible = true">登陆</el-button>
  <!-- 对话框 -->
  <el-dialog
  title="提示"
  :visible.sync="dialogVisible"
  width="25%"
  :before-close="handleClose">
  <template #default>
    <el-form ref="form" label-width="80px">
    <el-form-item label="用户名">
      <el-input
      placeholder="请输入用户名"
      prefix-icon="el-icon-user-solid"
      v-model="userForm.userName"
      />
    </el-form-item>
    <el-form-item label="密码">
      <el-input
      placeholder="请输入密码"
      v-model="userForm.userPassword"
      prefix-icon="el-icon-lock"
      show-password
       />
    </el-form-item>
  </el-form>
  </template>
  <template #footer>
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </template>
</el-dialog>


data () {
    return {
      userForm: {
        userName: '',
        userPassword: ''
      },
      dialogVisible: false
    }
  },
  methods: {
    handleClose (done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => {})
    }
  }
}



.el-input__inner {
  width: 90%!important;
}